﻿using Kendo.Mvc.UI.Fluent;

namespace Guan.CMS.Common.Framework
{
    public static class Extensions
    {
        public static GridBoundColumnBuilder<T> Centered<T>(this GridBoundColumnBuilder<T> columnBuilder) where T : class
        {
            return columnBuilder.HtmlAttributes(new { align = "center" })
                            .HeaderHtmlAttributes(new { style = "text-align:center;" });
        }

        public static GridTemplateColumnBuilder<T> Centered<T>(this GridTemplateColumnBuilder<T> columnBuilder) where T : class
        {
            return columnBuilder.HtmlAttributes(new { align = "center" })
                            .HeaderHtmlAttributes(new { style = "text-align:center;" });
        }
    }
}